export interface Config {
  apiBaseUrl: string;
  apiEndpoints: {
    auth: {
      login: string;
      logout: string;
      register: string;
    };
    user: {
      profile: string;
      list: string;
      create: string;
      update: string;
      delete: string;
    };
    role: {
      list: string;
      create: string;
      update: string;
      delete: string;
      permissions: string;
    };
    permission: {
      list: string;
      create: string;
      update: string;
      delete: string;
    };
  };
  tokenKey: string;
  defaultPageSize: number;
}

const config: Config = {
  apiBaseUrl: process.env.NODE_ENV === 'development' 
    ? 'http://localhost:8080/api'
    : 'https://api.codeplay.com/api',
  
  apiEndpoints: {
    auth: {
      login: '/auth/login',
      logout: '/auth/logout',
      register: '/auth/register'
    },
    user: {
      profile: '/user/profile',
      list: '/user/list',
      create: '/user',
      update: '/user',
      delete: '/user'
    },
    role: {
      list: '/role/list',
      create: '/role',
      update: '/role',
      delete: '/role',
      permissions: '/role/permissions'
    },
    permission: {
      list: '/permission/list',
      create: '/permission',
      update: '/permission',
      delete: '/permission'
    }
  },
  
  tokenKey: 'code_play_token',
  defaultPageSize: 10
};

export default config; 